3.2.42 \(\int \cot (c+d x) (a+b \sin (c+d x)) \, dx\) [142]

Optimal. Leaf size=24 \[ \frac {a \log (\sin (c+d x))}{d}+\frac {b \sin (c+d x)}{d} \]

[Out]

a*ln(sin(d*x+c))/d+b*sin(d*x+c)/d

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {2800, 45} \begin {gather*} \frac {a \log (\sin (c+d x))}{d}+\frac {b \sin (c+d x)}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]*(a + b*Sin[c + d*x]),x]

[Out]

(a*Log[Sin[c + d*x]])/d + (b*Sin[c + d*x])/d

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2800

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^m)/(b^2 - x^2)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2
 - b^2, 0] && IntegerQ[(p + 1)/2]

Rubi steps

\begin {align*} \int \cot (c+d x) (a+b \sin (c+d x)) \, dx &=\frac {\text {Subst}\left (\int \frac {a+x}{x} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \left (1+\frac {a}{x}\right ) \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {a \log (\sin (c+d x))}{d}+\frac {b \sin (c+d x)}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 43, normalized size = 1.79 \begin {gather*} \frac {a (\log (\cos (c+d x))+\log (\tan (c+d x)))}{d}+\frac {b \cos (d x) \sin (c)}{d}+\frac {b \cos (c) \sin (d x)}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]*(a + b*Sin[c + d*x]),x]

[Out]

(a*(Log[Cos[c + d*x]] + Log[Tan[c + d*x]]))/d + (b*Cos[d*x]*Sin[c])/d + (b*Cos[c]*Sin[d*x])/d

________________________________________________________________________________________

Maple [A]
time = 0.10, size = 23, normalized size = 0.96

method result size
derivativedivides \(\frac {b \sin \left (d x +c \right )+a \ln \left (\sin \left (d x +c \right )\right )}{d}\) \(23\)
default \(\frac {b \sin \left (d x +c \right )+a \ln \left (\sin \left (d x +c \right )\right )}{d}\) \(23\)
risch \(-i a x -\frac {2 i a c}{d}+\frac {a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}+\frac {b \sin \left (d x +c \right )}{d}\) \(43\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)*(a+b*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(b*sin(d*x+c)+a*ln(sin(d*x+c)))

________________________________________________________________________________________

Maxima [A]
time = 0.36, size = 22, normalized size = 0.92 \begin {gather*} \frac {a \log \left (\sin \left (d x + c\right )\right ) + b \sin \left (d x + c\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+b*sin(d*x+c)),x, algorithm="maxima")

[Out]

(a*log(sin(d*x + c)) + b*sin(d*x + c))/d

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 24, normalized size = 1.00 \begin {gather*} \frac {a \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) + b \sin \left (d x + c\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+b*sin(d*x+c)),x, algorithm="fricas")

[Out]

(a*log(1/2*sin(d*x + c)) + b*sin(d*x + c))/d

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sin {\left (c + d x \right )}\right ) \cot {\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+b*sin(d*x+c)),x)

[Out]

Integral((a + b*sin(c + d*x))*cot(c + d*x), x)

________________________________________________________________________________________

Giac [A]
time = 9.45, size = 23, normalized size = 0.96 \begin {gather*} \frac {a \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) + b \sin \left (d x + c\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+b*sin(d*x+c)),x, algorithm="giac")

[Out]

(a*log(abs(sin(d*x + c))) + b*sin(d*x + c))/d

________________________________________________________________________________________

Mupad [B]
time = 6.56, size = 47, normalized size = 1.96 \begin {gather*} \frac {a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {a\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d}+\frac {b\,\sin \left (c+d\,x\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(c + d*x)*(a + b*sin(c + d*x)),x)

[Out]

(a*log(tan(c/2 + (d*x)/2)))/d - (a*log(tan(c/2 + (d*x)/2)^2 + 1))/d + (b*sin(c + d*x))/d

________________________________________________________________________________________